You are here: Symbol Reference > Dew Namespace > Dew.Stats Namespace > Dew.Stats.Units Namespace > Classes > Statistics Class > Statistics Methods > Statistics.Moment Method
Dew Stats for .NET
ContentsIndexHome
PreviousUpNext
Statistics.Moment Method

Moments.

Syntax
C#
Visual Basic
public static double Moment([In] TVec X, double AMean, [In] int AOrder);
Parameters 
Description 
[In] TVec X 
Data. An exception is raised if X vector is complex. 
double AMean 
A mean value of all X vector elements. 
[In] int AOrder 
Defines the order of central moment. 

the AOrder-th central moment of all X vector elements.

Calculate the fourth moment (related to Kurtosis)

using Dew.Math; using Dew.Stats; using Dew.Stats.Units; namespace Dew.Examples { private void Example() { Vector a = new Vector(0); a.SetIt(false, new double[] {1, 2, 7, 8}); double amean = a.Mean(); double m4 = Statistics.Moment(a,amean,4); // m4 = 94.5625 } }
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!